import Vue from 'vue'
import App from './App'
import store from './store'
import uView from "uview-ui";
Vue.use(uView);
//#ifdef MP-WEIXIN
import 'weapp-cookie'
//#endif
Vue.config.productionTip = false

App.mpType = 'app'
Vue.prototype.$store = store

Vue.prototype.$confirm = function(title, content, cb) {
	uni.showModal({
		title: title || '提示',
		content: content || '',
		success: res => {
			if (res.confirm) {
				cb()
			} else if (res.cancel) {
				console.log('用户点击取消');
			}
		}
	});
}

import filters from "./filters";
Object.keys(filters).map(e => {
	Vue.filter(e, value => {
		return filters[e](value);
	});
});


const app = new Vue({
	store,
	...App
})
app.$mount()
